<?php



namespace App\Http\Requests\Company\Administrator;


use App\Http\Requests\Company\BaseRequest;

class AdministratorRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $rules = [

            'role_ids' => 'required',
            'user_id' => 'required',
        ];



        return $rules;
    }

    public function messages()
    {
        return [
            'role_ids.required' => __('请选择用户角色'),
            'user_id.required' => __('请选择用户'),
        ];
    }

    public function filldata()
    {


        $data = [
            'role_ids' => $this->input('role_ids',[]),
            'user_id' => $this->input('user_id')

        ];



        return $data;
    }
}
